package cn.wolfcode.p2p.Exception;

import lombok.Getter;


@Getter
public enum ErrorCode {
    SEND_NO_USER(-1, "没有该用户账户"),
    SEND_KEY_ERROR(-2, "接口密钥不正确"),
    SEND_KEY_ENCRYPTION_ERROR(-21, "	MD5接口密钥加密不正确"),
    SEND_INSUFFICIENT_QUANTITY(-3, "短信数量不足"),
    SEND_DISABLE(-11, "该用户被禁用"),
    SEND_ILLEGAL_CHARACTER(-14, "短信内容出现非法字符"),
    SEND_PHONE_FOMAT_ERROR(-4, "手机号格式不正确"),
    SEND_PHONE_ISNULL(-41, "	手机号码为空"),
    SEND_CONTENT_ISNULL(-42, "	短信内容为空"),
    SEND_SIGN_ERROR(-51, "短信签名格式不正确"),
    SEND_SIGN_TOLONG(-52, "短信签名太长"),
    SEND_IP_ERROR(-6, "IP限制"),

    /**
     * USERNAME_ISNULL : 用户名为空
     * PASSWORD_ISNULL : 密码为空
     * CONFIRMED_ISNULL : 确认密码为空
     * VERIFYCODE_ISNULL : 验证码为空
     */

    USERNAME_ISNULL(1, "用户名不能为空"),
    PASSWORD_ISNULL(2, "密码不能为空"),
    VERIFYCODE_ISNULL(3, "验证码不能为空"),
    CONFIRMPWD_ISNULL(4, "确认密码不能为空"),
    USERNAME_FORMAT_ERROR(5, "手机号格式不正确"),
    USERNAME_IS_EXIST(6, "该手机号已被注册"),
    PASSWORD_LENGTH_ERROR(7, "密码长度错误"),
    PASSWORD_MISMATCHING(8, "两次输入的密码不一致"),
    VERIFYCODE_LENGTH_ERROR(9, "验证码长度错误"),
    SENDMESSAGE_FREQUENT(10, "发送验证码过于频繁"),
    USERNAME_INCONFORMITY(11, "注册的手机号与接收验证码的手机号不一致"),
    VERIFYCODE_UNAVAIL(12, "验证码失效"),
    VERIFYCODE_INCONFORMITY(13, "验证码不匹配"),
    USERNAME_AND_PASSWORD_INCONFORMITY(14,"账号密码不匹配"),
    ACCOUNT_LOCK(15,"账号被锁定"),
    LOGIN_FAIL(16,"登陆失败"),
    INFORMATION_MODIFICATION_ERROR(17,"信息更新失败,请稍后再试[LOCK]"),
    REPEATED_SUBMIT_AUTH(18,"认证申请正在审核中"),
    HAVE_TO_REVIEW(19,"该申请已被审核"),
    ALREADY_AUTHENTICATION_SUCCESS(20,"已经认证成功"),
    ALREADY_ORDER(21,"已经提交了预约"),
    LESS_THAN_THE_MINIMUM_LOAN(22,"小于系统最低借款"),
    GREATER_THAN_THE_HIGHEST_LOAN(23,"大于个人最高借款"),
    LESS_THAN_THE_SYSTEM_MINIMUM_INTEREST_RATE(24,"小于系统最低利率"),
    GREATER_THAN_THE_SYSTEM_MINIMUM_INTEREST_RATE(25,"大于系统最高利率"),
    LESS_THAN_THE_SYSTEM_MINIMUM_REPAYMENT_MONTH(26,"小于系统最低还款月数"),
    GREATER_THAN_THE_SYSTEM_MINIMUM_REPAYMENT_MONTH(27,"大于系统最高还款月数"),
    REPAYMENT_TYPE_ERROR(28,"还款类型错误"),
    LESS_THAN_THE_MINIMUM_BID_AMOUNT_OF_THE_SYSTEM(29,"小于系统最低投标金额"),
    LESS_THAN_THE_MAXIMUM_NUMBER_OF_BIDDING_DAYS(30,"小于系统最小招标天数"),
    GREATER_THAN_THE_MAXIMUM_NUMBER_OF_BIDDING_DAYS(31,"小于系统最大招标天数"),
    BORROWING_TITLE_IS_EMPTY(32,"借款标题为空"),
    BORROWING_DESCRIPTION_IS_EMPTY(33,"借款描述为空"),
    UNMET_BORROWING_CONDITIONS(34,"为满足借款条件"),
    ALREADY_BORROWED(35,"已经处在借款流程中"),
    BANK_INFO_ERROR(36,"请选择您充值的银行"),
    TRADECODE_IS_EMPTY(37,"交易号为空"),
    TRADETIME_IS_EMPTY(38,"充值时间为空"),
    RECHARGEAMOUNT_IS_EMPTY(39,"充值金额为空"),
    DESCRIPTION_IS_EMPTY(40,"说明信息为空"),
    TRANSACTION_NUMBER_ALREADY_EXISTS(41,"交易单号已被使用"),
    THE_ACCOUNT_ALREADY_EXISTS(42,"银行账户已经存在"),
    INSUFFICIENT_BALANCE_AVAILABLE_FOR_ACCOUNT(43,"账户可用余额不足,请先充值"),
    THE_TOTAL_INVESTMENT_AMOUNT_IS_GREATER_THAN_THE_MAXIMUM_INVESTMENT_AMOUNT(44,"对该借款的总投资额大于该借款最大的投资额"),
    EXCEEDING_THE_REMAINING_INVESTMENT_AMOUNT(45,"超过剩余可投资额"),
    THE_INVESTMENT_AMOUNT_CANNOT_BE_EMPTY(46,"投资金额不能为空"),
    THE_INVESTMENT_AMOUNT_IS_LESS_THAN_THE_MINIMUM_BID_AMOUNT(47,"投资金额小于最小投标金额"),
    MUST_FILL_THE_REMAINING_LOAN(48,"必须投满剩余借款"),
    CAN_NOT_INVEST_IN_OWN_LOANS(49,"不能投自己的借款"),
    UPDATE_SYSTEM_ACCOUNT_EXCEPTION(50,"更新系统账户异常[LOCK异常]"),
    THE_LOAN_HAS_BEEN_REPAID(51,"该期借款已还"),
    NOT_A_PAYER(52,"不是该标的还款人"),
    BORROWER_CANNOT_SUBSCRIBE(53,"借款人不能认购"),
    THE_TRANSFEROR_CANNOT_SUBSCRIBE(54,"转让人不能认购"),
    CREDITS_CANNOT_BE_SUBSCRIBED(55,"该标不处于招标中"),
    INSUFFICIENT_AMOUNT_CANNOT_BE_SUBSCRIBED(56,"金额不足无法认购"),
    SUBSCRIPTION_FAILED(57,"认购失败[lock],请稍后重试"),
    REGISTRATION_FAILED(58,"注册失败"),
    FAILED_TO_CREATE_EXPERIENCE_ACCOUNT(59,"创建体验金账户失败"),
    INVALID_EXPERIENCE_ISSUE_NUMBER_OF_MONTHS(60,"无效的体验标发放月数");

    private int code;
    private String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
